package entertainmentguide;

import HelperClasses.Database.ClearAllRecords;
import HelperClasses.Database.PopulateDatabase;
import gui.EntertainmentGuideGui;
import java.sql.SQLException;
import javax.swing.JFrame;
import manageDataBase.DBManager;

//
// ---- ΣΥΓΓΡΑΦΕΙΣ : ΟΜΑΔΑ 3ΗΣ ΕΡΓΑΣΙΑΣ  ----
//

public class EntertainmentGuide {
            
    public static void main(String[] args) throws SQLException {
        
        
        DBManager db = new DBManager();
        ClearAllRecords.FromAllTables(db);
        PopulateDatabase.AllTables(db);
        db.closeDB();
        
        JFrame MainForm = new EntertainmentGuideGui();
        MainForm.setBounds(50, 100, 800, 800);
        MainForm.setLocationRelativeTo(null); // possition center of screen
        MainForm.setResizable(false); // not resizeable
        MainForm.setVisible(true); // show MainForm - login screen
        
            //System.out.printf(" ---"+UserType.valueOf("ADMINISTRATOR").toInt() +"---" );
      
            //System.out.printf("Η getAllRestaurant δίνει:\n%s\n", db.getAllRestaurant());
            //System.out.printf("Η getAllCategory δίνει:\n%s\n", db.getAllCategory());
            //System.out.printf("Η getAllArea δίνει:\n%s\n", db.getAllArea());
            //System.out.printf("Η getAllPriceRange δίνει:\n%s\n", db.getAllPriceRange());
            //System.out.printf("Η getAllUser δίνει:\n%s\n", db.getAllUser());
            //System.out.printf("Η getAllReservation δίνει:\n%s\n", db.getAllReservation());
            //System.out.printf("Η getAllRating δίνει:\n%s\n", db.getAllRating());

            //System.out.printf("Η getRestaurantById για Id:1 δίνει:\n%s\n", db.getRestaurantById(1));

            //db.addRestaurant("t","f","2310555555","descript","inform",2,1,3);
            //db.delRestaurant(5);
            

    }
}